package com.jyh.homework.homework1;

/**
 * @Author JYH
 * @Date 2024/8/7 16:56
 * @Description
 */
public class HomeWork1 {
    public static void main(String[] args) {
        MyThread m1 = new MyThread();
        Thread t1 = new Thread(m1,"子程序");
        t1.start();

        for (int i = 1; i <= 5; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println(Thread.currentThread().getName()+"第"+i+"次执行");
        }


    }
}

